package org.springblade.modules.admin.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author: Sharry
 * @createTime: 2024-10-11 16:35
 * @version: Version-1.0
 */
@Getter
@AllArgsConstructor
public enum MaintainPartsAttributeNatureEnum {

	/**
	 * 对应blade_maintain_parts_attribute表nature字段
	 */
	QUANTITATIVE(1, "定性"),

	FIXED_QUANTITY(2, "定量"),

	OPERATION(3, "操作");

	final int nature;

	final String name;

	/**
	 * 获取状态名称
	 */
	public static String getName(Integer nature) {
		for (MaintainPartsAttributeNatureEnum e : MaintainPartsAttributeNatureEnum.values()) {
			if (e.nature == nature) {
				return e.name;
			}
		}
		return null;
	}
}
